load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "rangefeedbuffer",
    srcs = [
        "buffer.go",
        "kvs.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangefeed/rangefeedbuffer",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/util/hlc",
        "//pkg/util/log",
        "//pkg/util/syncutil",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "rangefeedbuffer_test",
    srcs = [
        "buffer_test.go",
        "kvs_test.go",
    ],
    embed = [":rangefeedbuffer"],
    deps = [
        "//pkg/keys",
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/util/encoding",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "@com_github_stretchr_testify//require",
    ],
)
